<?
include ("usersystem/config/conf.php");
@$fileurl=$_GET['fileurl']?$_GET['fileurl']:$_POST['fileurl'];
if(strpos($fileurl,"?")>0)
 $fileurl=str_replace(strchr($fileurl,"?"),"",$fileurl);

if(strstr($fileurl,$filesSite))
{
  $filename=str_replace($filesSite,$filesPath,$fileurl);
  //$filename=substr($fileurl,strlen($compareUrl),strlen($fileurl)-strlen($compareUrl));
  $filesize   =   filesize($filename); 
  header( "Content-Type:   application/force-download "); 
  header( "Content-Disposition:   attachment;   filename= ".basename($filename)); 
  header( "Content-Length:   ".$filesize); 
  $data   =   file_get_contents($filename); 
  echo   $data; 
}
?> 